#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include<vector>
#include<string>

using namespace std;

int countPrefixes(vector<string>& words, string s) {
    int res = 0;
    for (auto str : words)
    {
        int len = str.size();
        if (s.substr(0, len) == str)
            res++;
    }
    return res;
}

void deal(string& s1, string& s2)
{
    if (s1.size() == s2.size())
    {
        string res;
        for (int i = 0; i < s1.size(); i++)
        {
            res += s2[i];
            res += s1[i];
        }
        cout << res << endl;
        return;
    }
    if (s1.size() > s2.size())  swap(s1, s2);
    int n = s1.size(), m = s2.size();
    int cnt = m / (n + 1), left = m % (n + 1);
    int t = n - left;

    int l = 0, r = 0;
    string res;
    while (r < m)
    {
        for (int i = 0; i < cnt; i++)
            res += s2[i + r];
        if(l < n)
        res += s1[l++];
        r += cnt;
        if (left)
        {
            for (int i = 0; i <= cnt; i++)
                res += s2[i + r];
            res += s1[l++];
            left--;
            r += cnt + 1;
        }
    }

    cout << res << endl;
}

int main()
{
    string s1 = "+-*/";
    string s2 = "ABCD";
    deal(s1, s2);
    return 0;
}